﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;

namespace DC.Utils
{
    public class FileHelper
    {
        public static string ReadFile(string FileName)
        {
            try
            {
                StreamReader sr = new StreamReader(FileName);
                string content = sr.ReadToEnd();
                sr.Close();
                return content;
            }
            catch
            {
                return string.Empty;
            }
        }

        public static void WriteFile(string FileName, string Content)
        {
            try
            {
                StreamWriter sw = new StreamWriter(FileName);
                sw.Write(Content);
                sw.Close();
            }
            catch
            {

            }
        }
    }
}
